<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

	defined( '_JEXEC' ) or die( 'Restricted access' );
	
	$title = "";
	$alias = "";
	$description = "";

	if($this->values != ""){
		$title = $this->values["0"]["title"];
		$alias = $this->values["0"]["alias"];
		$description = $this->values["0"]["description"];
	}
?>

<div style="overflow:hidden">
	<table class="adminform" border="0" cellpadding="3" cellspacing="0" align="left">
		<tr>
			<td align="left" width="5%"><b><?php echo JText::_("COM_SURVEYS_TITLE"); ?>:</b><span style="color:#FF0000">*</span></td>
			<td align="left" >
				<?php
					$title = str_replace('"', "&quot;", $title);
				?>					
				<input class="inputbox" type="text" size="50" maxlength="250" name="title" value="<?php echo stripslashes($title) ; ?>" />
			</td>
		</tr>
		<?php
			if(isset($this->values["0"]) && isset($this->values["0"]["alias"]) && $this->values["0"]["alias"] != "" && $alias != ""){				
				$alias = strtolower($alias);
				$alias = str_replace(" ", "-", $alias);
				$alias = str_replace("&", "a", $alias);
				$alias = str_replace("@", "", $alias);
				$alias = str_replace("'", "", $alias);
				$alias = str_replace('"', "", $alias);
				$alias = str_replace('?', "", $alias);
				$alias = str_replace('/', "", $alias);
				$alias = str_replace('\\', "", $alias);
				$alias = $alias;
			}
			else{
				$alias = strtolower($title);
				$alias = str_replace(" ", "-", $alias);
				$alias = str_replace("&", "a", $alias);
				$alias = str_replace("@", "", $alias);
				$alias = str_replace("'", "", $alias);
				$alias = str_replace('"', "", $alias);
				$alias = str_replace('?', "", $alias);
				$alias = str_replace('/', "", $alias);
				$alias = str_replace('\\', "", $alias);
				$alias = $alias;
			}
		?>
		<tr>
			<td align="left" width="5%"><b><?php echo JText::_("COM_SURVEYS_ALIAS"); ?>:</b> </td>
			<td align="left" >
				<input class="inputbox" type="text" size="50" maxlength="250" name="alias" value="<?php echo stripslashes($alias) ; ?>" />
			</td>
		</tr>
		<tr>
			<td align="left" valign="top"><b><?php echo JText::_("COM_SURVEYS_DESCRIPTION"); ?>:</b></td>
			<td align="left" valign="top">
				<?php
					$editor1  =& JFactory::getEditor();
					echo $editor1->display( 'description',  ''.stripslashes($description) , '100%', '270px', '150', '10' ) ; 
				?>
			</td>
			
		</tr>
	</table>
</div>